package com.horizon.wxapp.controller;

import com.horizon.wxapp.entity.Categories;
import com.horizon.wxapp.service.CategoriesService;
import com.horizon.wxapp.vo.GoodVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("categories")
public class CategoriesController {

    @Autowired
    private CategoriesService categoriesService;

    @RequestMapping
    public List<Categories> getCategoriesByTitle(String title) {
        return categoriesService.getCategoryByTitle(title);
    }
}
